from flask import Flask,g

app = Flask(__name__)

@app.route('/')
def index():
    print(g.uname)
    return 'Hello'

@app.errorhandler(500)
def server_error(error):
    return '500错误',500

if __name__ == '__main__':
    app.run()